<template>
  <div class="topic">
    <div class="title">
      专题精选
    </div>
    <van-swipe :loop="false" :width="300" :show-indicators="false">
      <van-swipe-item v-for="item in topicList" :key="item.id">
        <img :src="item.item_pic_url" alt="" width="300" height="200" />
        <h2 class="van-ellipsis">{{item.title}}<span class="price">{{item.price_info | RMBformat}}</span></h2>
        <p class="van-ellipsis">{{item.subtitle}}</p>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  props: ['topicList'],
  data () {
    return {

    }
  }
}
</script>
 
<style lang = "less" scoped>
.topic {
  background-color: #fff;
  padding: 0 .08rem 0;

  .title {
    font-size: .20rem;
    color: #333333;
    text-align: center;
    line-height: .5rem;
    height: .5rem;
  }

  .price {
    color: darkred;
  }

  .van-swipe-item {
    font-family: '黑体';
    color: #333333;
    margin-right: .1rem;
    padding-bottom: .1rem;
    h2 {
      font-size: .16rem;
      height: .4rem;
      line-height: .4rem;
    }
    p {
      font-size: .14rem;
    }
  }
}
</style>